package com.example.demo.model.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.example.demo.student.entity.Student;
import com.example.demo.student.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Administrator
 */
@Component
public class DemoComponent {

    @Autowired
    private IStudentService studentService;

    public List<Student> getStudents() {
        LambdaQueryWrapper<Student> query = Wrappers.lambdaQuery(Student.class);
        return studentService.list(query);
    }


}
